
# driver =webdriver.Chrome()     #实例化驱动
#
# driver.get('http://121.43.29.41:8899/admin/login')    #打开网页
# driver.maximize_window()                  #最大化页面
# #输入zhanghao
# WebDriverWait(driver,10,0.5).until(EC.presence_of_element_located((By.CLASS_NAME,'el-input__inner'))).send_keys('admin')
# #输入密码
# WebDriverWait(driver,10,0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME,'el-input__inner')))[1].send_keys('admin123.')
# #点击登录
# WebDriverWait(driver,10,0.5).until(EC.presence_of_element_located((By.CLASS_NAME,'el-button'))).click()
#
# #点击用户
# WebDriverWait(driver,10,0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME,'layout-columns')))[1].click()
#
# time.sleep(3)
# #点击用户分组
# WebDriverWait(driver,10,0.5).until(EC.presence_of_element_located((By.XPATH,'//*[@id="app"]/section/div[2]/aside/div[2]/div[1]/div/div/ul/li[2]/span'))).click()
# #点击添加用户分组
# WebDriverWait(driver,10,0.5).until(EC.presence_of_element_located((By.CLASS_NAME,'el-button'))).click()
# #点击添加分组栏
# WebDriverWait(driver,10,0.5).until(EC.presence_of_element_located((By.CLASS_NAME,'el-input__inner'))).click()
# #添加
# WebDriverWait(driver,10,0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME,'el-button')))[2].send_keys('a')
# #点击确定
# WebDriverWait(driver,10,0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME,'el-button')))[2].click()
# #点击删除a
# WebDriverWait(driver,10,0.5).until(EC.presence_of_element_located((By.XPATH,'//*[@id="app"]/section/div[2]/section/div/div[1]/div/main/div/div[1]/div/div[1]/div/div/div/div[2]/div[4]/div[2]/table/tbody/tr[5]/td[3]/div/a[2]'))).click()
# #点确定
# WebDriverWait(driver,10,0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME,'el-button')))[2].click()
#
# time.sleep(5)
#驱使化
# driver=webdriver.Chrome()
# #打开网页
# driver.get('https://y.qq.com/portal/pop_login.html')
# #最大化
# driver.maximize_window()
# #跳转框架
# iframe = WebDriverWait(driver,10,0.5).until(EC.presence_of_all_elements_located((By.TAG_NAME,'iframe')))
# driver.switch_to.frame(iframe[0])
#
# # #点头像登录
# # WebDriverWait(driver,10,0.5).until(EC.presence_of_element_located((By.ID,'img_out_2257414808'))).click()
# # #退出框架
# # driver.switch_to.default_content()
# #
# # time.sleep(5)

















#
# from selenium import webdriver
# from selenium.webdriver.common.by import By
# from selenium.webdriver.support import expected_conditions as EC
# from selenium.webdriver.support.ui import WebDriverWait
# import time
# from time import sleep
# from crmeb import *
# class CRMEB:
#     def __init__(self,url,driver):
#         self.url=url
#         self.driver=driver
#     def open_browser(self):
#         self.driver.get(self.url)
#         self.driver.maximize_window()
#     def denglu(self,username,password):
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_element_located((By.CLASS_NAME, 'el-input__inner'))).send_keys('admin')
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'el-input__inner')))[1].send_keys('admin123.')
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_element_located((By.CLASS_NAME, 'el-button'))).click()
#     def addUserGroup(self):
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME,'layout-columns')))[1].click()
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_element_located((By.XPATH, '//*[@id="app"]/section/div[2]/aside/div[2]/div[1]/div/div/ul/li[2]/span'))).click()
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_element_located((By.CLASS_NAME, 'el-input__inner'))).click()
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'el-button')))[2].send_keys('a')
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'el-button')))[2].click()
#     def shanchu(self):
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_element_located((By.XPATH,'//*[@id="app"]/section/div[2]/section/div/div[1]/div/main/div/div[1]/div/div[1]/div/div/div/div[2]/div[4]/div[2]/table/tbody/tr[5]/td[3]/div/a[2]'))).click()
#         WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_all_elements_located((By.CLASS_NAME,'el-button')))[2].click()
# if __name__ == '__main__':
#     driver=webdriver.Chrome()
#     c1=CRMEB(driver=driver,url='http://121.43.29.41:8899/admin/login')
#     c1.open_browser()
#     c1.denglu('admin','admin123.')
#     c1.addUserGroup()
#     c1.shanchu()


